<html>
<head>
    <title>TestAjax</title>
    <script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
    <script type="text/javascript">
        function doAjaxTest() {
            var hreq = new XMLHttpRequest();
            hreq.onreadystatechange = function () {
                if (hreq.readyState == 4 && hreq.status == 200) {
                    document.getElementById("toChangeDiv").innerHTML = hreq.responseText;
                }
            }
            hreq.open('GET', 'http://localhost:8080/test', true);
            hreq.send(null);
        }

        function doAjaxTestJQuery() {
            $('#toChangeDiv').load('http://localhost:8080/test');
        }

    </script>
</head>
<body>
<div id="toChangeDiv"></div>
<input type="button" value="Do" onclick="doAjaxTestJQuery()"/>
</body>
</html>